import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
import { Department } from "./Department";

@Entity()
export class Employee {
  @PrimaryGeneratedColumn()
  id: number

  @Column({length:100})
  name: string

  @ManyToOne(() => Department, department => department.employees)
  @JoinColumn()
  department: Department;
}